package design_pattern.factory_abstract;

public class Client {

  /**
   * @param args
   */
  public static void main(String[] args) {
    NWFactory yanSheng = new YanSheng();
    NWFactory yinSheng = new YinSheng();
    Person man = yanSheng.createPerson("Man");
    man.eat();
    man.talk();
    Animal bulk = yanSheng.createAnimal("Bulk");
    bulk.eat();
    bulk.sleep();
    Person woment = yinSheng.createPerson("Woman");
    woment.eat();
    woment.talk();
    Animal cow = yinSheng.createAnimal("Cow");
    cow.eat();
    cow.sleep();
  }

}
